Subtyping Recursive Types in Kernel Fun
نویسندگان
چکیده
The problem of defining and checking a subtype relation between recursive types was studied in [3] for a first order type system, but for second order systems, which combine subtyping and parametric polymorphism, only negative results are known [17]. This paper studies the problem of subtype checking for recursive types in system kernel Fun, a typed -calculus with subtyping and bounded second order polymorphism. Along the lines of [3], we study the definition of a subtype relation over kernel Fun recursive types, and then we present a subtyping algorithm which is sound and complete with respect to this relation. We show that the natural extension of the techniques introduced in [3] to compare first order recursive types gives a non complete algorithm. We prove the completeness and correctness of a different algorithm, which also admits an efficient implementation.
منابع مشابه
Subtyping Recursive Types in Kernel Fun, Preliminary Draft
The problem of deening and checking a subtype relation between recursive types was studied in AC93] for a rst order type system, but for second order systems, which combine subtyping and parametric polymorphism, only negative results are known Ghe93b]. This paper studies the problem of subtype checking for recursive types in system kernel Fun, a typed-calculus with subtyping and bounded second ...
متن کاملSubtyping recursion and parametric polymorphism in kernel fun
We study subtype checking for recursive types in system kernel Fun, a typed λcalculus with subtyping and bounded second-order polymorphism. Along the lines of [AC93], we define a subtype relation over kernel Fun recursive types, and prove it to be transitive. We then show that the natural extension of the algorithm introduced in [AC93] to compare first-order recursive types yields a non complet...
متن کاملSubtyping First-Class Polymorphic Components
We present a statically typed, class-based object oriented language where classes are first class polymorphic values. A main contribution of this work is the design of a type system that combines first class polymorphic values with structural equirecursive types and admits a subtyping algorithm which is arguably much simpler than existing alternatives. Our development is modular and can be easi...
متن کاملRecursive Types Are not Conservative over F ≤ ( extended abstract )
F≤ is a type system used to study the integration of inclusion and parametric polymorphism. F≤ does not include a notion of recursive types, but extensions of F≤ with recursive types are widely used as a basis for foundational studies about the type systems of functional and object-oriented languages. In this paper we show that adding recursive types results in a non conservative extension of t...
متن کاملBounded Quantiication with Bottom
While numerous extensions of Cardelli and Wegner's calculus of polymorphism and subtyping, Kernel Fun, have been studied during the past decade, one quite simple one has received little attention: the addition of a minimal type Bot, dual to the familiar maximal type Top. We develop basic meta-theory for this extension. Although most of the usual properties of Kernel Fun (existence of meets and ...
متن کامل